package com.jic.manager.service;

import com.jic.common.base.vo.Page;
import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.conf.request.AddCmsModuleRequest;
import com.jic.conf.request.AddModuleDataRequest;
import com.jic.conf.request.CmsModuleTemplateQuery;
import com.jic.conf.request.GetModuleCmsConfRequest;
import com.jic.conf.request.SectionMobileRequest;
import com.jic.conf.request.rest.CmsModuleAndDataRequest;
import com.jic.conf.request.rest.GetCmsProductListRequest;
import com.jic.conf.response.rest.CmsGetIndexPageConfResponse;
import com.jic.conf.response.rest.GetCmsProductListResponse;
import com.jic.conf.response.rest.PageModuleResponse;
import com.jic.manager.entity.CmsModule;
import com.jic.manager.entity.CmsModuleTemplate;
import com.jic.manager.entity.vo.request.CmsModuleRequest;
import com.jic.manager.entity.vo.response.CmsModuleResponse;

import java.util.List;

/**
* cms栏目
* @author : 
* @email : 
* @since : 2020-03-04 11:59:53
* @version : v1.0.0
*/
public interface CmsModuleService {

    long insert(CmsModule cmsModule);

    long delete(Long id);

    long update(CmsModule cmsModule);

    CmsModule queryByPrimaryKey(Long id);

    List<CmsModule> query(CmsModule cmsModule);

    PageResult<CmsModule> queryPage(CmsModule cmsModule, Page pageQuery);
    

    List<com.jic.conf.response.CmsModuleResponse> query(Long cmsId, int refType);

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    List<CmsModuleResponse> listCmsModuleRecordPagination(CmsModuleRequest request);

    /**
     * 分页查询总记录数接口
     * @param request 分页查询总记录数接口入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long listPageCount(CmsModule request) throws Throwable;

    /**
     * 不分页查�
     *
     * @param request
     * @return
     */
    List<CmsModule> listCmsModuleAllRecord(CmsModule request);

    /**
     * 修改
     *
     * @param request
     * @return
     */
    long updateCmsModule(CmsModule request) throws Throwable;

    /**
     * 详情
     *
     * @param request
     * @return CmsModule
     *  @auther
     */
    CmsModule getCmsModule(CmsModule request);

    /**
     * 高校保存或修改接�
     * @param request 保存或修改入�
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long saveOrUpdateCmsModule(CmsModule request) throws Throwable;

    /**
     * 保存接口
     * @param request 保存入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long addCmsModule(CmsModule request) throws Throwable;

    /**
     * 删除接口
     * @param request 删除入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long deleteCmsModule(CmsModule request) throws Throwable;

    /**
     * 删除接口
     * @param request 删除入参
     * @return String
     * @auther tzc
     * @date 2020-3-11 20:58:44
     */
    long deleteCmsModuleLogically(CmsModule request) throws Throwable;

    /**
     * 查询首页Cms配置
     * @return
     */
    RestResult<CmsGetIndexPageConfResponse> getIndexCmsConf(CmsModuleAndDataRequest cmsModuleAndDataRequest);

    RestResult<List<GetCmsProductListResponse>> getCmsProductList(GetCmsProductListRequest getCmsProductListRequest);

    RestResult<PageModuleResponse> addModule(AddCmsModuleRequest addCmsModuleRequest);

    RestResult<String> addModuleData(AddModuleDataRequest addModuleDataRequest);

    RestResult<String> sectionMobile(SectionMobileRequest sectionMobileRequest);

    RestResult<CmsGetIndexPageConfResponse> getModuleCmsConf(GetModuleCmsConfRequest getModuleCmsConfRequest);

    RestResult<CmsModuleTemplate> getCmsModuleTemplate(CmsModuleTemplateQuery getModuleCmsConfRequest);

    RestResult<String> deleteModule(SectionMobileRequest sectionMobileRequest);
}